﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Diagnostics;
using CYTS.Aoyou.Framework.Log;

namespace CYTS.Aoyou.Framework.Service
{
    public class ServiceTraceListener : TextWriterTraceListener
    {
        public ServiceTraceListener()
            : base("xml")
        {
        }

        public override void Write(string message)
        {
            WriteLine(message);
        }

        public override void WriteLine(string message)
        {
            if (!message.Contains("MessageLogTraceRecord"))
            {
                return;
            }

            CommonLogger.LogInfo(message);
        }

    }
}
